import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Permission from "./views/auth/Permission";
import Role from "./views/auth/Role";
import Menu from "./views/auth/Menu";
import Employee from "./views/org/Employee";
import NoPermission from "./views/403";
import Shop from "./views/org/Shop";
import ShopRegister from "./views/ShopRegister";
import carType from "./views/car/carType";
import Car from "./views/car/Car";
let routes = [
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf: true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        hidden: true,
        children: [
            { path: '/403', component: NoPermission, name: '无权访问' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Department', component: Department, name: '部门管理' },
            { path: '/Employee', component: Employee, name: '员工管理' },
            { path: '/Shop', component: Shop, name: '店铺管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Permission', component: Permission, name: '权限列表' },
            { path: '/Role', component: Role, name: '角色列表' },
            { path: '/Menu', component: Menu, name: '菜单列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '车辆管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/carType', component: carType, name: '车辆类型' },
            { path: '/car', component: Car, name: '车辆管理' },
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;